package cn.iocoder.yudao.module.form.service.impl;

import cn.iocoder.yudao.module.form.dataobject.FormChartParam;
import cn.iocoder.yudao.module.form.mysql.FormChartParamMapper;
import cn.iocoder.yudao.module.form.service.IFormChartParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报表参数对应Service业务层处理
 *
 * @author Fan KaiXiang
 * @date 2022-08-31
 */
@Service
public class FormChartParamServiceImpl implements IFormChartParamService
{
    @Autowired
    private FormChartParamMapper formChartParamMapper;

    /**
     * 查询报表参数对应
     *
     * @param id 报表参数对应主键
     * @return 报表参数对应
     */
    @Override
    public FormChartParam selectFormChartParamById(Long id)
    {
        return formChartParamMapper.selectFormChartParamById(id);
    }

    /**
     * 查询报表参数对应列表
     *
     * @param formChartParam 报表参数对应
     * @return 报表参数对应
     */
    @Override
    public List<FormChartParam> selectFormChartParamList(FormChartParam formChartParam)
    {
        return formChartParamMapper.selectFormChartParamList(formChartParam);
    }

    /**
     * 新增报表参数对应
     *
     * @param formChartParam 报表参数对应
     * @return 结果
     */
    @Override
    public int insertFormChartParam(FormChartParam formChartParam)
    {
        return formChartParamMapper.insertFormChartParam(formChartParam);
    }

    /**
     * 修改报表参数对应
     *
     * @param formChartParam 报表参数对应
     * @return 结果
     */
    @Override
    public int updateFormChartParam(FormChartParam formChartParam)
    {
        return formChartParamMapper.updateFormChartParam(formChartParam);
    }

    @Override
    public int updateByChartSort(FormChartParam formChartParam) {
        return formChartParamMapper.updateByChartSort(formChartParam);
    }

    /**
     * 批量删除报表参数对应
     *
     * @param ids 需要删除的报表参数对应主键
     * @return 结果
     */
    @Override
    public int deleteFormChartParamByIds(Long[] ids)
    {
        return formChartParamMapper.deleteFormChartParamByIds(ids);
    }

    /**
     * 删除报表参数对应信息
     *
     * @param id 报表参数对应主键
     * @return 结果
     */
    @Override
    public int deleteFormChartParamById(Long id)
    {
        return formChartParamMapper.deleteFormChartParamById(id);
    }

    @Override
    public int deleteFormChartParamByChartId(Long chartId) {
        return formChartParamMapper.deleteFormChartParamByChartId(chartId);
    }
}
